package com.sx.sx1.tools;


import org.apache.commons.io.FilenameUtils;

import java.io.File;

public class PathTraversalExample {
    public static void main(String[] args) {

        String p1 = "d:/opt";

        String path = "../../../../passwd";

        //路径遍历
        File file = cn.hutool.core.io.FileUtil.newFile(path);
        System.out.println(file);
        //file.mkdir();
        System.out.println(file.isDirectory());


    }
}
